CMD=vimdiff

MINE=$3
THEIRS=$2
MERGED=$4

$CMD $MINE $THEIRS

if [ $? -eq 0 ]; then
    cp $MINE $MERGED
fi
